/**
 * @author hhlxy
 * @version 1.0
 * @since 2025/8/13
 */
package cn.yilongquan.service.impl.base;

import cn.yilongquan.mapper.Base.BaseMapper;
import cn.yilongquan.service.base.IBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class BaseServiceImpl<T> implements IBaseService<T> {
    @Autowired
    private BaseMapper<T> baseMapper;


    @Override
    public T findById(Long id) {
        return baseMapper.findById(id);
    }

    @Override
    public List<T> findAll() {
        return baseMapper.findAll();
    }

    @Override
    public void add(T t) {
        baseMapper.add(t);
    }

    @Override
    public void update(T t) {
        baseMapper.update(t);
    }

    @Override
    public void deleteById(Long id) {
        baseMapper.deleteById(id);
    }

    @Override
    public void batchDelete(List<Long> ids) {
        baseMapper.batchDelete(ids);
    }
}
